#!/usr/bin/env python

class Player(object):
    
    def __init__(self, name, faction, colDet):
        self.name = name
        self.faction = faction
        self.colDet = colDet
        
    def move(self, x, y):
        targetX = self.x + x
        targetY = self.y + y
        if ( colDet.moveAllowed(targetX, targetY, "player")):
            self.x += x
            self.y += y